﻿using System;
using System.Collections.Generic;
using System.Text;

class ReplaceIdenticalLetters
{
    static void Main()
    {
        Console.WriteLine("Enter a word:");
        string word = Console.ReadLine();
        StringBuilder sBuilder = new StringBuilder();
        sBuilder.Append(word[0]);
        for(int index = 1; index < word.Length; index++)
        {
            if (word[index].CompareTo(word[index - 1]) == 0)
            {
                continue;
            }
            else
            {
                sBuilder.Append(word[index]);
            }
        }
        Console.WriteLine(sBuilder.ToString());
    }
}

